unit Installation;

interface

uses
  GlobalRecordsAndEnums;

type
  TInstallation = class
    private
    public
      CopyInstallation: Double;
      CopyHourly: Double;
      CopyTimeModifier: Double;
      CopyMaterialModifier: Double;
      InventionInstallation: Double;
      InventionHourly: Double;
      InventionTimeModifier: Double;
      InventionMaterialModifier: Double;
      ManufactureInstallation: Double;
      ManufactureHourly: Double;
      ManufactureTimeModifier: Double;
      ManufactureMaterialModifier: Double;

      constructor Create;
      procedure Load(installation: SInstallation);
      function Save: SInstallation;
  end;

implementation

constructor TInstallation.Create;
begin
  CopyInstallation := 1000;
  CopyHourly := 333;
  CopyTimeModifier := 1;
  CopyMaterialModifier := 1;
  InventionInstallation := 1000;
  InventionHourly := 333;
  InventionTimeModifier := 1;
  InventionMaterialModifier := 1;
  ManufactureInstallation := 1000;
  ManufactureHourly := 333;
  ManufactureTimeModifier := 1;
  ManufactureMaterialModifier := 1;
end;

procedure TInstallation.Load(installation: SInstallation);
begin
  self.CopyInstallation := installation.CopyInstallation;
  self.CopyHourly := installation.CopyHourly;
  self.CopyTimeModifier := installation.CopyTimeModifier;
  self.CopyMaterialModifier := installation.CopyMaterialModifier;
  self.InventionInstallation := installation.InventionInstallation;
  self.InventionHourly := installation.InventionHourly;
  self.InventionTimeModifier := installation.InventionTimeModifier;
  self.InventionMaterialModifier := installation.InventionMaterialModifier;
  self.ManufactureInstallation := installation.ManufactureInstallation;
  self.ManufactureHourly := installation.ManufactureHourly;
  self.ManufactureTimeModifier := installation.ManufactureTimeModifier;
  self.ManufactureMaterialModifier := installation.ManufactureMaterialModifier;
end;

function TInstallation.Save: SInstallation;
begin
  result.CopyInstallation := self.CopyInstallation;
  result.CopyHourly := self.CopyHourly;
  result.CopyTimeModifier := self.CopyTimeModifier;
  result.CopyMaterialModifier := self.CopyMaterialModifier;
  result.InventionInstallation := self.InventionInstallation;
  result.InventionHourly := self.InventionHourly;
  result.InventionTimeModifier := self.InventionTimeModifier;
  result.InventionMaterialModifier := self.InventionMaterialModifier;
  result.ManufactureInstallation := self.ManufactureInstallation;
  result.ManufactureHourly := self.ManufactureHourly;
  result.ManufactureTimeModifier := self.ManufactureTimeModifier;
  result.ManufactureMaterialModifier := self.ManufactureMaterialModifier;
end;

end.
